package com.example.demo.util;

import org.springframework.util.DigestUtils;

import java.util.UUID;

public class Judge {
    public static boolean isNull(String str){
        if(str != null && !"".equals(str)){
            return false;
        }
        return true;
    }
    public static boolean isNotNull(String str){
        if(str != null && !"".equals(str)){
            return true;
        }
        return false;
    }
    public static String md5(String str){
        return DigestUtils.md5DigestAsHex(str.getBytes());
    }
    public static String getUUID(){
        return UUID.randomUUID().toString();
    }
}
